package com.ruoyi.backend.service.impl;

import com.ruoyi.backend.domain.Activity;
import com.ruoyi.backend.mapper.ActivityInformationMapper;
import com.ruoyi.backend.service.IActivityInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 信息发布Service业务层处理
 *
 * @author 王冰冰
 * @date 2025-03-20
 */
@Service
public class ActivityInformationServiceImpl implements IActivityInformationService {
    @Autowired
    private ActivityInformationMapper activityInformationMapper;

    /**
     * 查询信息发布
     *
     * @param activityId 信息发布主键
     * @return 信息发布
     */
    @Override
    public Activity selectActivityByActivityId(Long activityId) {
        return activityInformationMapper.selectActivityByActivityId(activityId);
    }

    /**
     * 查询信息发布列表
     *
     * @param activity 信息发布
     * @return 信息发布
     */
    @Override
    public List<Activity> selectActivityList(Activity activity) {
        return activityInformationMapper.selectActivityList(activity);
    }

    /**
     * 新增信息发布
     *
     * @param activity 信息发布
     * @return 结果
     */
    @Override
    public int insertActivity(Activity activity) {
        return activityInformationMapper.insertActivity(activity);
    }

    /**
     * 修改信息发布
     *
     * @param activity 信息发布
     * @return 结果
     */
    @Override
    public int updateActivity(Activity activity) {
        return activityInformationMapper.updateActivity(activity);
    }

    /**
     * 批量删除信息发布
     *
     * @param activityIds 需要删除的信息发布主键
     * @return 结果
     */
    @Override
    public int deleteActivityByActivityIds(Long[] activityIds) {
        return activityInformationMapper.deleteActivityByActivityIds(activityIds);
    }

    /**
     * 删除信息发布信息
     *
     * @param activityId 信息发布主键
     * @return 结果
     */
    @Override
    public int deleteActivityByActivityId(Long activityId) {
        return activityInformationMapper.deleteActivityByActivityId(activityId);
    }
}